package com.example.himalayaproject.find.monthlyfocus;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.example.himalayaproject.R;

public class WebViewActivity extends AppCompatActivity {
  private WebView webView;
    private Toolbar toolbar;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_view);
        initView();
        initToolbar();
    }

    private void initToolbar() {
        toolbar= (Toolbar) findViewById(R.id.toolbar);

        getSupportActionBar();
        setSupportActionBar(toolbar);
//        ActionBarDrawerToggle toggle=new ActionBarDrawerToggle()
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//        toolbar.set

    }

    private void initView() {
        webView= (WebView) findViewById(R.id.web);
        Intent intent=getIntent();
        String url=intent.getStringExtra("url");
        webView.setWebViewClient(new WebViewClient());
        webView.setWebChromeClient(new WebChromeClient());
        webView.loadUrl(url);
    }
}
